/**
 * @filename:StudentDao Student
 * @project constract  V1.0
 * Copyright(c) 2018 lin keqing Co. Ltd. 
 * All right reserved. 
 */
package com.znufe.exam.repository;

import java.util.List;

import com.znufe.exam.domain.students.StudentResponseObject;
import com.znufe.exam.domain.students.StudentValidationObject;
import com.znufe.exam.domain.students.StudentVoteInfoObject;
import com.znufe.exam.viewmodel.admin.student.*;
import org.apache.ibatis.annotations.Mapper;
import com.znufe.exam.domain.Student;
import org.apache.ibatis.annotations.Param;

/**   
 *  
 * @Description:  学生信息表——DAO
 * @Author:       lin keqing   
 * @CreateDate:   Student
 * @Version:      V1.0
 *    
 */
@Mapper
public interface StudentMapper extends BaseMapper<Student> {
	
	Student selectByPrimaryKey(Integer id);

	Student selectByStuName(String stuName);
	
	int deleteByPrimaryKey(Integer id);
	
	int insertSelective(Student student);

	int updateByPrimaryKeySelective(Student student);

	List<StudentResponseObject> studentPage(StudentPageRequestVM requestVM);

	List<StudentSignInResponseVM> studentSignInPage(StudentSignInRequestVM requestVM);

	RandomStudentResponseVM selectRandomStudentByClassId(RandomStudentRequestVM requestVM);
	
	List<Student> queryStudentList(Student student);

	Student selectByStuPhone(String stuPhone);

	List<StudentValidationObject> selectValidationByClassId(Integer classId);

	int insertBatchStudent(List<Student> studentsToImport);

	Student selectByVoteIdInClass(@Param("classId") Integer classId, @Param("voteId") String voteId);

	List<StudentVoteInfoObject> selectAllStudentVoteInfoInClass(Integer classId);

}
